package com.unknown.wiki.manager;

import com.unknown.common.countDownTimer.CountDownTimerFactory;
import com.unknown.common.countDownTimer.CountDownTimerService;
import com.unknown.common.function.EEFunction;
import com.unknown.common.function.SEFunction;

public class ServiceManager {
    private static ServiceManager serviceManager;

    private ServiceManager() {
    }

    public static void init() {
        serviceManager = new ServiceManager();
    }

    public static ServiceManager getInstance() {
        return serviceManager;
    }

    public CountDownTimerService getCountDownTimerService(long millisInFuture, long countDownInterval, SEFunction<Long> onTick, EEFunction onFinish) {
        return CountDownTimerFactory.getCountDownTimerService(millisInFuture, countDownInterval, onTick, onFinish);
    }
}
